#pragma once
#include "SDL.h"
#include "SDL_image.h"

class background
{
public:
	background(void)
	{
		this->offset.x = 0;
		this->offset.y = 0;

		this->WEIGHT=22;
		this->HEIGHT=22;
	}

	~background(void)
	{
		instance = false;
	}
	
	static background *background::getInstance()
	{
		if(!instance)
		{
			back = new background();
			instance = true;
			return back;
		}
		else
		{
			return back;
		}
	}
	
	void backgroundToLoad();
	void draw(SDL_Surface *screen);
	void update(SDL_Surface *screen);
	void setFree();

	SDL_Surface *bckgrnd;
	SDL_Rect offset;
	SDL_Event event;

private:
	//static int HEIGHT; 
	//static int WEIGHT; 

	static bool instance;
	static background *back;

	int HEIGHT;
	int WEIGHT;
};

